package com.air.ota.vo;

import com.air.ota.util.HexStringUtil;

public class SZTCancelConfirmReqTransVO extends SZTBaseReqTransVO {
	
	protected byte[] cardAppSequence;
	protected byte[] result;
	protected byte[] ewalletRemain;
	protected byte[] cardTransSequence;
	
	public SZTCancelConfirmReqTransVO(byte[] deviceSequence, byte[] sztSequence,String deviceTriggerTime,
			byte[] cardAppSequence,byte[] result,
			byte[] ewalletRemain,byte[] cardTransSequence)throws Exception{
		super(deviceSequence, sztSequence,deviceTriggerTime);
		this.transTypeCode = 0x47;
		this.subTransTypeCode = 0x10;
		//this.cardPhyType = 0x02;
		this.tranAppendCode = 0x05;
		
		this.cardAppSequence = cardAppSequence;
		this.result = result;
		this.ewalletRemain = ewalletRemain;
		this.cardTransSequence = cardTransSequence;
		
		this.transData  = makeTransData();
		
	}
	
	public byte[] makeTransData(){
		StringBuffer hexStringBuf = new StringBuffer();
		
		
		hexStringBuf.append(HexStringUtil.bytesToHexString(cardAppSequence));
		hexStringBuf.append(HexStringUtil.bytesToHexString(result));
		hexStringBuf.append(HexStringUtil.bytesToHexString(ewalletRemain));
		hexStringBuf.append(HexStringUtil.bytesToHexString(cardTransSequence));
		
		
		return HexStringUtil.hexStringToBytes(hexStringBuf.toString());
	}
	
}	
